package com.azzcs.listener;

import com.azzcs.lifecycle.LifecycleListener;
import com.azzcs.lifecycle.LifecycleState;

/**
 * @Author: wzg
 * @Date: 2021/1/7 下午3:52
 */
public class LogListener implements LifecycleListener {

    @Override
    public void lifecycleEvent(LifecycleState state, Object data) {
        if(data == null) {
            System.out.println(state.name());
        }else {
            System.out.println(state.name()+"==="+data.toString());
        }
    }
}
